<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>
	<p:dataTable var="user" value="#{userModel.list}" rowKey="#{user.id}" filteredValue="#{userModel.filteredList}" filterEvent="enter"
		rendered="#{userModel.isInitialized}" paginator="true" rows="10"
		rowsPerPageTemplate="5,7,10,15,20,30,40,50"
		paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">
		<p:column headerText="id">
			<h:outputText value="#{user.id}" />
		</p:column>
		<p:column>
			<p:selectBooleanCheckbox value="#{user.selected}">
				<p:ajax event="change" process="@this"></p:ajax>
			</p:selectBooleanCheckbox>
		</p:column>
		<p:column headerText="Last Name" sortBy="#{user.lastName}" filterBy="#{user.lastName}"
			filterMatchMode="contains">
			<h:outputText value="#{user.lastName}" />
		</p:column>
		<p:column headerText="First Name" sortBy="#{user.firstName}" filterBy="#{user.firstName}"
			filterMatchMode="contains" >
			<h:outputText value="#{user.firstName}" />
		</p:column>
		<p:column headerText="Title" sortBy="#{user.title}">
			<h:outputText value="#{user.title}" />
		</p:column>
		<p:column headerText="Telephone" sortBy="#{user.telephone}" filterBy="#{user.telephone}"
			filterMatchMode="contains">
			<h:outputText value="#{user.telephone}" />
		</p:column>
		<p:column
			sortBy="#{user.dropOffLocation.number}"
			filterBy="#{user.dropOffLocation.number}:#{user.dropOffLocation.address}"
			filterMatchMode="contains">
			<h:outputText
				value="#{user.dropOffLocation.number}:#{user.dropOffLocation.address}" />
		</p:column>
		<p:column headerText="Email">
			<h:outputText value="#{user.email}" filterBy="#{user.email}"
			filterMatchMode="contains"/>
		</p:column>
	</p:dataTable>
</ui:composition>
</html>